#include "SpritePrincess.h"

SpritePrincess::SpritePrincess(CL_GraphicContext gc)
{
	pcontext = gc;
	for(int h=0;h<FRAMES_PRINCESS;h++){
		presources[h]=NULL;
	}
	presources[0]= new CL_ResourceManager("PrincessStanding.xml");
	presources[1]= new CL_ResourceManager("PrincessWinning.xml");
	presources[2]= new CL_ResourceManager("PrincessLoosing.xml");
	for(int i=0;i<FRAMES_PRINCESS;i++){
		psprites[i]=NULL;
	}
	psprites[0]=new CL_Sprite(gc, "PrincessStanding", presources[0]);
	psprites[1]=new CL_Sprite(gc, "PrincessWinning", presources[1]);
	psprites[2]=new CL_Sprite(gc, "PrincessLoosing", presources[2]);
}

void SpritePrincess::drawfixedstanding(CL_Vec2<int> position)
{
	psprites[0]->draw(pcontext, position.x, position.y);
}

void SpritePrincess::drawwinning(CL_Vec2<int> position)
{
	psprites[1]->draw(pcontext,position.x, position.y);
}

void SpritePrincess::drawloosing(CL_Vec2<int> position)
{
	psprites[2]->draw(pcontext,position.x, position.y);
}